package TokenRecognizer;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author jefoutta
 */
import  java.util.*;

public class State {
    private String label;
    private boolean acceptation = false;
    private boolean error;
    private Sets<State> stateSet;
    //public static Hashtable<String, State> stateTable = new Hashtable();

    public State(){
        label = null;
    }

    public State(String s){
        label = s;
    }

    public State(Sets<State> list){
        stateSet = list;
        for(int i = 0; i < list.getSize(); i++)
            if(list.get(i).getAcceptation())
                this.setAcceptation(true);
    }

    public void setLabel(String s){
        label = s;
    }

    public String getLabel(){
        return label;
    }

    public boolean getAcceptation(){
        return acceptation;
    }

    public void setAcceptation(boolean b){
        acceptation = b;
    }

    public String toString(){
        return label;
    }
}
